<%@ page pageEncoding="UTF-8"%>
<body>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td bgcolor="#001C4E" id="topPanle">
				&nbsp;

			</td>
		</tr>
		<tr>
			<td class="login_backbar">
				<center>
					<div class="login_background" id="centerPanle"
						style="width: 823px; height: 458px">
						<form id="login_form" method="post" action="login.action">
							<div class="login">
								<div>
									<span> 用户名： </span>
									<span> <input
											onMouseOver="javascript:this.className='loginInputHover';"
											onMouseOut="javascript:this.className='loginInput'"
											onclick="javascript:$('#errorInfo').hide();"
											class="loginInput" id="name" name="name" type="text" /> </span>
								</div>
								<div style="margin-top: 2px">
									<span> 密&nbsp;&nbsp;码： </span>
									<span> <input
											onMouseOver="javascript:this.className='loginInputHover'"
											onMouseOut="javascript:this.className='loginInput'"
											class="loginInput" type="password" id="password"
											name='password' /> </span>
								</div>
								<div style="margin-left: 80px; margin-top: 5px">
									<span> <input
											onMouseOver="javascript:this.className='login_btnhover'"
											onMouseOut="javascript:this.className='login_btn'"
											class="login_btn" name="" type="button" onClick="submitBtn()" />
									</span>
									<span> <input
											onMouseOver="javascript:this.className='login_btnhover2'"
											onMouseOut="javascript:this.className='login_btn2'"
											class="login_btn2" name="" type="button" onClick="resetBtn()" />
									</span>
								</div>
								<div class="login_errorInfo" id="errorInfo">
									<s:if test="errorInfo!=null">
										<s:property value="errorInfo" />
									</s:if>
								</div>
							</div>
						</form>
						<div class="copy">
							浙江智能科技有限公司版权所有 &copy;2013 V1.0
						</div>
					</div>
				</center>
			</td>
		</tr>
		<tr>
			<td bgcolor="#018AD7" height="100%" id="footerPanle"></td>
		</tr>
	</table>
	<script type="text/javascript">
	 function setdisplay(){
	 	var height=document.documentElement.scrollHeight;
		if(navigator.userAgent.indexOf("Safari")>0){
			height=document.body.scrollHeight;
		}
		var centerHeight= document.getElementById("centerPanle").offsetHeight;
		var topHeight = (height-centerHeight)/2 +37;
		var footHeight = (height-centerHeight)/2 -40;
		document.getElementById("topPanle").style.height=topHeight+"px";
		document.getElementById("footerPanle").style.height=footHeight+"px";
	 }
	 
	 function resetBtn(){
		$("#name").attr('class','logininput');
		$("#password").attr('class','logininput');
		$("#name").val('');
		$("#password").val('');
		$("#errorInfo").hide();
	}
	
	function submitBtn(){
		if($("#name").val()==""){
			$("#errorInfo").html("错误提示：用户名不能为空！");
			$("#errorInfo").show();
			return false;
		}else{
			$("#login_form").submit();
		}
	}
	 
	 $().ready(function(){
		$('#name').bind('keyup', function(event){
		   if (event.keyCode=="13"){
		   	 $('#password').focus();
		   }
		});
		$('#password').bind('keyup', function(event){
		   if (event.keyCode=="13"){
		   	 submitBtn();
		   }
		});
	});
	
	  window.onload=function () {
		setdisplay();
	  }
	  
	   window.onresize=function () {
		setdisplay();
	  }
	</script>
</body>




